home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-23 | 1.5 KB | 55 lines | [TEXT/GEOL] |
- Item 1864731 21-March-90 14:31PST
-
- From: MACAPP.ADMIN Design Methodology,Joel Norvell,VCA
-
- To: DAWSON.M Dawson, Mark
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: Re: two TEedit records in…
-
- Hi Mark,
-
- You need to subclass TTEView and OVERRIDE its DoMouseCommand to set the target
- to the "hit" TEView. Of course, the target only needs to be reset if you are
- changing TEViews. Doing this might be complicatated slightly by the fact that
- you're in a dialog view.
-
- Best regards - Joel
-
- {-----------------------------------------------------------------------------}
- {$S YourSegmentName}
-
- FUNCTION TMyTEView.DoMouseCommand
- ( VAR theMouse: Point;
- VAR info: EventInfo;
- VAR hysteresis: Point): TCommand; OVERRIDE;
- VAR
- theTarget: TView;
-
- BEGIN
- {$IFC qDebug}
- Writeln('Mouse in TEView');
- {$ENDC}
-
- DoMouseCommand := gNoChanges;
-
- theTarget := TView(TWindow(SELF.GetWindow).fTarget);
- {First find target by looking in window !!!}
-
- IF theTarget <> SELF THEN
- BEGIN
-
- { We won't have to UnDo any TextView selection in
- our SuperView's DoMouseCommand.
- That is taken care of by the SetTarget call to InstallSelection.}
-
- TWindow(SELF.GetWindow).SetTarget(SELF);
- END;
-
- DoMouseCommand := INHERITED DoMouseCommand(theMouse, info, hysteresis);
- END;
-
- {-----------------------------------------------------------------------------}
-
-